#!/usr/bin/env bash

# listen.sh
#
# Purpose: This scripts run PacketListener
#
#

MOTE_IFACE=`motelist | tail -1 | awk '{print $2}'`
MOTE_IFACE="serial@$MOTE_IFACE:telosb"

if [ -z $MOTE_IFACE ]; then
    echo "MOTE_IFACE is not set. (motelist command may have failed)"
    exit 1
fi


java -jar ../MoteInterface/PacketListener.jar $MOTE_IFACE



